<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<jsp:include page="/common.jsp" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma"   content="no-cache">   
<meta http-equiv="Cache-Control"   content="no-cache">   
<meta http-equiv="Expires"   content="0">  
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/resource/form.css">
	<script type="text/javascript">
	$(document).ready(function(){
		$("#uploadButton").click(function(){
			var options = { 
					url:'${pageContext.request.contextPath}/system/prod/upload.htm',
					onSubmit:function(){
						return window.parent.validateRequiredFields($("#uploadForm")[0]);
					},
		            success:function(data){
		            	window.parent.afterUploadSubmit(data);
		            }
		        };
			$("#uploadForm").form(options);
			$("#uploadForm").submit();
		});
	});
</script>
<style type="text/css">
table tr td{
	margin:0;
	padding:0;
}
</style>
</head>
<body style="margin: 0;padding:0；">
	<form id="uploadForm" method="post" enctype="multipart/form-data">
		<table>
			<tr>
				<td><input type="file" name="productImage" size="11"
					alt="图片路径#true#jpg-png-gif-jpeg"/><br></td>
			</tr>
			<tr>
				<td align="right"><input id="uploadButton" type="button" value="上传" /></td>
			</tr>
		</table>
	</form>
</body>
</html>